package com.gzh.core.util.constant;

import lombok.Getter;

@Getter
public enum ErrorCode {
    /* 通过错误码 */
    COMMON_001("200",""),
    ERROR_001("500","请求异常"),

    /* 发送邮件错误码 */
    MAIL_001("100","发送邮件失败"),

    /* 发送短信错误码 */
    SMS_001("101","发送短信失败"),
    /* 注册错误码 */
    REGISTER_001("102","验证码错误或失效"),
    REGISTER_002("103","手机号消失了请重新注册"),

    /* 登录错误码 */
    LOGIN_001("104","账号不存在"),
    LOGIN_002("105","密码不正确"),
    LOGIN_003("106","无token,请重新登陆"),
    LOGIN_004("107","非法访问"),

    UPDATE_107("107","原密码不正确"),
    UPDATE_108("108","用户不存在"),
    UPDATE_109("109","原密码与新密码不相同"),


    UPLOAD_110("110","上传文件失败"),

    /* 教师操作错误码*/
    TEACHER_111("111","数据异常"),

    /* 学生操作错误码*/
    STUDENT_121("121","课程已结课或已撤销"),
    STUDENT_122("122","已加入该课程"),
    STUDENT_123("123","作业已结束"),

    ADD_130("130","解析excel添加人员错误"),
    ADD_131("131","只能上传excel文件"),
    /* 签到错误码 */
    CHECK_100("100","必要信息为空"),
    CHECK_101("101","课程签到信息不存在"),
    CHECK_102("102","已签到，请不要重复签到"),
    CHECK_103("103","用户不存在"),
    CHECK_104("104","验证码不正确"),
    CHECK_105("105","你不是本课程学生"),
    CHECK_106("106","15分钟过了不能再签到了"),
    ;
    //错误代码
    private final String code;
    //错误信息
    private final String msg;

    ErrorCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
